$(document).ready(function(){
  var dataString = "accountId=" + $("#accountIdOld").val();
  $.ajax(
  {
    type: "GET",
    url: "enterNewPartyAjax.php",
    data: dataString,
    success:function(msg1)
    {
      $('.partyData').html(msg1);
    }
  });

  $(".capital").keyup(function() {
    var val = $(this).val();
    $(this).val(val.toUpperCase());
  });
  
  $("textarea").keyup(function() {
    var val = $(this).val();
   $(this).val(val.toUpperCase());
  })
});

function findGuaranterId(partyObj)
{
  var dataString = "accountId="+partyObj.value;
  $.ajax(
  {
    type: "GET",
    url: "enterNewPartyAjax.php",
    data: dataString,
    success:function(msg1)
    {
      $('.partyData').html(msg1);
    }
  });
}
var garanter;
function countDays()
{
	var loanAmount        = $("#loanAmount").val();
	var installmentAmount = $("#installmentAmount").val();
	if(installmentAmount != "" && installmentAmount != 0)
  {
	  var installmentDays   = loanAmount/installmentAmount;
	  $("#installmentDays").val(installmentDays);
	}
}
function interest()
{
	var loanAmount = $("#loanAmount").val();
	var monthlyInterest = $("#monthlyInterest").val();
	var monthlyInterestRs = (loanAmount * monthlyInterest) / 100;
	 $("#monthlyInterestRs").val(monthlyInterestRs);
}

function loanamount()
{
  var val1 = document.getElementById('value1').value;
  $('#loanAmount').val(val1);
}